Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PRG 121686 운영체제
🚩 설계
'''
"우선순위"라는게 나오면 heapq(우선순위 큐)를 생각하자
q라는 우선순위 큐를 특정 시각 기준에 아직 처리되지 않은 프로그램들이 담겨있는 대기 목록이라 생각하고,
여기서 우선순위 가장 높은 애를 빠르게 뽑을 수 있다
일단, 로직의 흐름은 다음과 같다
주의: 0초에 호출되는 프로그램이 없을 수도 있다.
주의: 3-1-2순으로 하면 골치아파짐
참고: 리스트도 pop 할 수 있다! popleft()는 없고 pop()하면 맨 마지막 원소, pop(0)하면 첫번째 원소
'''
'''
힙큐 사용법 다시...
'''